package com.wing.wcabinet.model.response;

import com.wing.product.model.entity.ProductType;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.wcabinet.model.entity.WcabCellLoad;

/**
 * 上货数量VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WcabCellLoadVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 领货单id
     */
    private Long receiveId;

    /**
     * 类型
     */
    private WcabCellLoad.Type type;

    /**
    * 类型描述
    */
    @TableField(exist = false)
    private String typeDesc;

    public String getTypeDesc() {
        return type.getDesc();
    }

    /**
     * 上货单号
     */
    private String code;

    /**
     * day
     */
    private Integer day;

    /**
     * no
     */
    private Integer no;

    /**
     * 操作类型
     */
    private WcabCellLoad.OperationType operationType;

    /**
    * 操作类型描述
    */
    @TableField(exist = false)
    private String operationTypeDesc;

    public String getOperationTypeDesc() {
        return operationType.getDesc();
    }


    private Integer quantity;

    private BigDecimal weight;

    private String skuCode;

    private String skuName;

    private String skuSpecOld;

    private String cabCode;

    private String spaceCode;


    private String remark;

    private String deviceCode;


    private String enterpriseCode;



    private ProductType.WeightUnit weightUnit;

    private String weightUnitDesc;

    public String getWeightUnitDesc(){
        if (this.weightUnit!=null){
            return this.weightUnit.getDesc();
        }
        return "";
    }

    private String quantityUnitDesc;




}
